import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { TransferHomeComponent } from './transfer-home/transfer-home.component';
import { TransferFormComponent } from './transfer-home/transfer-form/transfer-form.component';
import { TransferSuccessComponent } from './transfer-home/transfer-success/transfer-success.component';

const routes: Routes = [
  {
    path: '',
    component: TransferHomeComponent,
    children: [
      {
        path: '', redirectTo: 'home', pathMatch: 'full'
      },
      {
        path: 'home', component: TransferFormComponent,
      },
      {
        path: 'success', component: TransferSuccessComponent,
      },
      {
        path: '**', redirectTo: ''
      }
    ]
  },
  {
    path: '**',
    redirectTo: '',
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class TransferRoutingModule { }
